﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetCommand.Web
{
    public class WebMessage
    {
        public string Token;
        public int ErrorCode;
        public virtual uint CLSID
        {
            get { return 0; }
        }

        public WebMessage()
        {
            Token = "";
            ErrorCode = 0;
        }
    }

    public class WebMessageDefine
    {
        public const uint id_GetIdentifyCode = 0;
        public const uint id_ReturnRegCode = 1;
        public const uint id_RegisterUser = 2;
        public const uint id_RegisterUserResult = 3;
        public const uint id_ModifyPwd = 4;
        public const uint id_ModifyPwdResult = 5;
        public const uint id_LoginMessage = 6;
        public const uint id_LoginResult = 7;
        public const uint id_ReLogin = 8;
        public const uint id_GetSwitchState = 9;
        public const uint id_SwitchStateResult = 10;
        public const uint id_GetRatioOutputState = 11;
        public const uint id_RatioOutputStateResult = 12;
        public const uint id_GetRealtimeDeviceData = 13;
        public const uint id_RealtimeDeviceDataResult = 14;
        public const uint id_GetWheatherData = 15;
        public const uint id_WheatherDataResult = 16;
        public const uint id_SetTimer = 17;
        public const uint id_SetTimerResult = 18;
        public const uint id_RegisterDevivce = 19;
        public const uint id_RegisterDeviceResult = 20;
        public const uint id_SetDevice = 21;
        public const uint id_SetDeviceResult = 22;
        public const uint id_SetWheatherDevice = 23;
        public const uint id_SetWheatherDeviceResult = 24;
    }

    public class WebCodeDefine
    {
        public const int OK = 0;
        public const int NO_USER = 1;
        public const int PASSWORD_WRONG = 2;
        public const int REGIST_USER_HAS_USER = 3;
        public const int REGIST_IDENTIFY_CODE_WRONG = 4;
        public const int REP_PWD_NOT_EQU_NEW_PWD = 5;
        public const int CHANGE_PWD_NO_USER = 6;
        public const int CHANGE_PWD_OLD_WRONG = 7;
    }
}
  